﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MapsTest
{
    [TestClass()]
    public class WebMapProviderTest
    {
        private TestContext testContextInstance;

        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        //[TestMethod()]
        public void GetTileTest()
        {
            Assert.Inconclusive("Tento test neprovádí automatickou kontrolu. Průběh musí být zkontrolován ručně.");
            //DefaultTimingProvider.SetDefaultTimingProvider(new TimingProvider());
            //OsmMapSource target = new OsmMapSource();
            //GPSCoordinates gps = new GPSCoordinates(50.1, 14.5);
            //var intern = target.Projection.ToInternal(gps);
            //var tile = target.GetTileCoordinates(intern, 14);
            //var tileId = new TileId((int)Math.Floor(tile.X), (int)Math.Floor(tile.Y), 14);
            //
            //IMapCache cache = new MapStorage(null, new MapStorageContext());
            //WebMapSource source = target;
            //IDownloadLogger logger = null;
            //WebMapProvider provider = new WebMapProvider(cache, source, logger);
            //
            //GetTileTask actual;
            //actual = provider.GetTile(tileId, DownloadTaskPriority.Normal, NetworkMode.Online);
            //System.Threading.Thread.Sleep(3000);
            //actual = provider.GetTile(tileId, DownloadTaskPriority.Normal, NetworkMode.Online);
            //System.Threading.Thread.Sleep(3000);
        }
    }
}